package com.ruoyi.web.controller.api;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.Exguide;
import com.ruoyi.system.domain.News;
import com.ruoyi.system.service.impl.ExguideServiceImpl;
import com.ruoyi.system.service.impl.NewsServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

//解决跨域
@RestController
//请求路径方法
@CrossOrigin

@RequestMapping("/api")
public class wxExGuideController {

    @Autowired
    ExguideServiceImpl exguideService;


    //    写方法 HTTP GET POT
//    1.响应前端请求展示
    @RequestMapping("/guideList")
    public AjaxResult showAllexguide() {
//        查询数据库
        Exguide exguide=new Exguide();
        List<Exguide> ExguideList = exguideService.selectExguideList(exguide);
        return AjaxResult.success("success",ExguideList);
    }
}
